home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / utility / read707.zip / READ.DOC < prev    next >
Text File  |  1997-07-31  |  16KB  |  363 lines

  1. READ.DOC                               1                           Jul 31, 1997
  2.  
  3. WIN95 AND WINNT NOTICE:  As with most DOS-based utilities, this program doesn't
  4. understand the weird subdirectories, long filenames,  invalid  characters  that
  5. are possible under Windows 95 and Windows/NT.   Both  operating  systems  alias
  6. long filenames into names like MYFILE~1.TXT and you will need  to  specify  the
  7. aliased versions of file names to process  them.   Under  some  file  structure
  8. systems in NT, the program may not work at all.
  9.  
  10. READ allows you to view any ASCII text  document  with  16,000  lines  or  less
  11. (about 900,000 bytes).  You can also search for text within a document,  scroll
  12. around in the document, and split up big files into small files for printing or
  13. copying to another file.
  14.  
  15.  
  16. Features of the READ program:
  17.   * Handles files up to 16,000 lines only.
  18.   * Supports a mouse scroll bar at the top if a compatible mouse is detected.
  19.   * Handles DOS text files (lines end with CR/LF), Mac text  files  (lines  end
  20.     with CR), or Unix text files (lines end with LF).
  21.   * Allows text to be blocked and copied or printed.
  22.   * Supports 43/50-line mode under EGA and VGA.
  23.   * Allows jumping to DOS as well as allowing you  to  turn  off  this  feature
  24.     (useful for public-use terminals).
  25.   * Supports printer-initializing strings for wide and normal-width text.
  26.   * Allows the user to adjust terminal colors.
  27.   * Allows  text  searching  within  the   file,   either   case-sensitive   or
  28.     case-insensitive.
  29.   * Shows a ruler line if desired.
  30.   * Shows the file before it has finished loading  so  you  can  start  reading
  31.     sooner.
  32.   * Can Ctrl-PgUp/Ctrl-PgDn among up to 100 files.
  33.   * Expands tabs on display.
  34.   * The file date format shown is based on your country setting.
  35.   * Pressing escape stops the program early.
  36.  
  37.  
  38. Specifying parameters:
  39.  
  40. Parameters for this program can be set in the following ways.  The last setting
  41. encountered always wins:
  42.   - Read from an *.INI file (see BRUCEINI.DOC file),
  43.   - Through the use of an environmental variable (SET READ=whatever), or
  44.   - From the command line (see "Syntax" below)
  45.  
  46.  
  47.  
  48. READ.DOC                               2                           Jul 31, 1997
  49.  
  50. The READ.INI file:
  51.  
  52. The READ.INI file (see BRUCEINI.DOC) is very useful  because  READ.EXE  doesn't
  53. have a default for setting compressed mode  on  your  printer  when  you  print
  54. things.  If you have a Hewlett-Packard printer,  it  is  recommended  that  you
  55. create a READ.INI file that's stored in the  same  directory  as  the  READ.EXE
  56. file. The READ.INI should have at least the following lines:
  57.  
  58.         /INITT=\027E
  59.         /INITW=\027E\027(s16.66H
  60.         /AFTERF=\012\027E
  61.         /AFTERP=\012\027E
  62.  
  63. The READ.INI file can be created with any text editor.  You can  also  use  the
  64. free READINIT.EXE program if you have it.
  65.  
  66.  
  67. Syntax:
  68.  
  69.     READ [ filespec | @listfile | /PROMPT ] [ /TITLE="title" ] [ /DATE=NONE ]
  70.       [ /line ] [ /MONO ] [ /EGA | /VGA ] [ /-MOUSE ] [ /DOS | /-DOS ]
  71.       [ /Iinitfile | /-I ] [ /Q ] [ /PORT=port ] [ /INITT=string ]
  72.       [ /INITW=string ] [ /AFTERP=string ] [ /AFTERF=string ]
  73.       [ /COLOR=nnn nnn nnn nnn ] [ /? ] [ /?&H ]
  74.  
  75. where:
  76.  
  77. "filespec" is the file specification you want to view.   You  can  use  a  path
  78. specification  and  a  single  wildcard  if  you'd  like.   Unless  /PROMPT  is
  79. specified, it defaults to three wildcard selections; *.DOC, *.TXT,  and  *.BAT.
  80. If more than one document in the directory matches the wildcard, you can switch
  81. back and forth between documents with Ctrl-PgUp  and  Ctrl-PgDn.   The  program
  82. allows you to view up to 100 files in a single pass (it  will  skip  the  101st
  83. *.TXT file).
  84.  
  85. "@listfile" is a text file that contains the names of any files you  want  READ
  86. to process.  The text file should contain one filename, with path  if  desired,
  87. per line.  You can include an  optional  title  after  any  of  the  file  name
  88. references (see /TITLE="title" option).
  89.  
  90. "/PROMPT" tells the program to ignore the default for the  input  filespec  and
  91. always prompt the user  for  an  input  filespec  unless  one  is  specifically
  92. provided.  This is primarily used when  you're  invoking  the  program  from  a
  93. menuing program like Windows.  Defaults to "/-PROMPT".
  94.  
  95. "/TITLE="title" " lets you specify an optional descriptive title to  appear  at
  96. the bottom of the screen instead of the file name.  The title can be up  to  29
  97. characters in length unless /PAGE=NONE is specified in which case it can be  up
  98. to 44 characters in length.   Multi-word  titles  should  appear  in  quotation
  99. marks.
  100.  
  101. "/DATE=NONE" says to leave off the date-time stamp for the file on  the  status
  102. line.  This allows a user-defined title to be up to 44 characters in length.
  103.  
  104. "/line" puts line "line"  at  the  top  of  the  screen.   Only  applicable  if
  105. "filespec" (vs "@listfile") is used.
  106.  
  107. "/EGA" or "/VGA" will put you in 43/50-line mode if your monitor supports this.
  108.  
  109. READ.DOC                               3                           Jul 31, 1997
  110.  
  111. The two options are actually synonymous  (you'll  get  the  best  your  monitor
  112. supports).  You can also switch to and from 25-line and 43/50-line mode  within
  113. the program by using Alt-E.
  114.  
  115.  
  116. READ.DOC                               4                           Jul 31, 1997
  117.  
  118. "/MOUSE" says to present the mouse menu bar even if a mouse is not present. The
  119. program typically presents the mouse menu automatically if a mouse is detected.
  120.  
  121. "/-MOUSE" says to present the non-mouse menu bar even if a  mouse  is  present.
  122. The program typically presents a slightly different menu  if  a  mouse  is  not
  123. detected.
  124.  
  125. "/DOS" allows access to the jump to DOS feature of  the  program  (by  pressing
  126. Alt-J).  This is initially the default.
  127.  
  128. "/-DOS" prohibits jumping to DOS.  Initially defaults to "/DOS".
  129.  
  130. "/Q" suppresses a message that shows up while the  program  searches  for  your
  131. initfile.
  132.  
  133. "/PORT=port" specifies the printer port to use for  printing.   This  typically
  134. defaults to /PORT=LPT1:.
  135.  
  136. "/INITT=string" ("initialize thin") provides the string that will  be  sent  to
  137. the printer before printing if all lines in the document are 80  characters  or
  138. less in length.  The string can include decimal and hexadecimal characters (see
  139. BRUCEHEX.DOC file).  "\027" is the code for the special character Escape.   You
  140. can specify /INITT=NULL if desired.  Defaults to "/INITT=NULL".
  141.  
  142. "/INITW=string" ("initialize wide") provides the string that will  be  sent  to
  143. the printer before printing if any lines in the document (not just the  section
  144. printed) exceed 80 characters  in  length.   See  "/INITT=string"  description.
  145. Defaults to "/INITW=NULL".
  146.  
  147. For a Hewlett-Packard LaserJet, the following codes would typically be used:
  148.         /INITT=\027E             (portrait mode, 80 column)
  149.         /INITW=\027E\027(s16.66H (portrait mode, 132 column)
  150.  
  151. "/AFTERP=string" specifies the string to print  after  a  partial  document  is
  152. printed.  This string can include  a  page  eject  character  ("\012")  or  any
  153. printer  reset  codes  ("\012\027E")   you   want.    Initially   defaults   to
  154. "/AFTERP=\012".
  155.  
  156. "/AFTERF=string" specifies the  string  to  print  after  a  full  document  is
  157. printed. See "/AFTERP=string" description.  Defaults to "/AFTERF=\012".
  158.  
  159. "/COLOR=nnn nnn nnn nnn" specifies the color settings to use for (in order) (1)
  160. regular text, (2) the status line, (3) marked text, and (4) found  text.   Each
  161. setting must consist of three digits, the first two being the foreground  color
  162. and the last being the background color.  The foreground color should be padded
  163. on the left with a 0 if it is only one digit in length.  You can stop providing
  164. numbers at any point after the first if you're willing to  accept  the  default
  165. colors.
  166.  
  167.   For /COLOR, default is /COLOR=150 151 157 143
  168.   For /MONO, default is  /COLOR=150 007 157 087
  169.  
  170.  
  171. READ.DOC                               5                           Jul 31, 1997
  172.  
  173. Foreground colors:
  174.  
  175.         Low intensity           High intensity
  176.  
  177.         0 = black                8 = dark grey
  178.         1 = blue                 9 = light blue
  179.         2 = green               10 = light green
  180.         3 = cyan                11 = light cyan
  181.         4 = red                 12 = light red
  182.         5 = magenta             13 = light magenta
  183.         6 = brown (or yellow)   14 = light yellow
  184.         7 = white               15 = bright white
  185.  
  186. Adding 16 to any color will make the text blink.  Background colors can consist
  187. of 0 to 7 above.  Bright white on blue, for example, would be "151".
  188.  
  189. "/MONO" (or "/-COLOR") forces the system into monochrome mode.
  190.  
  191. "/COLOR" (or "/-MONO") forces the system into color mode.   This  is  typically
  192. the default.
  193.  
  194. "/Iinitfile" says to read an initialization file with the file name "initfile".
  195. The file specification *must* contain a period.  Initfiles are described in the
  196. BRUCEINI.DOC file.  Initially defaults to "/IREAD.INI".
  197.  
  198. "/-I" (or "/INULL") says to skip loading the initialization file.
  199.  
  200. "/ENV" says to look for %var% occurrences  in  the  command  line  and  try  to
  201. resolve any apparent environmental variable references.  See  BRUCEINI.DOC  for
  202. more information.  This is initially the default.
  203.  
  204. "/-ENV" says to skip resolving apparent %var% occurrences in the command  line.
  205. Initially defaults to "/ENV".
  206.  
  207. "/?" or "/HELP" shows you the syntax for the command.
  208.  
  209. "/?&H" gives you a hexadecimal and decimal conversion table.
  210.  
  211.  
  212.  
  213. READ.DOC                               6                           Jul 31, 1997
  214.  
  215. Viewing options:
  216.  
  217. While you're viewing a  document  with  the  READ  command,  you  can  use  the
  218. following keys:
  219.  
  220. Cursor movement keys (up/down):
  221.  
  222.      Up                moves up one line
  223.      Down              moves down one line
  224.      Home              moves to the top line of the document
  225.      End               moves to the bottom line of the document
  226.      PgUp              moves up one screen's worth
  227.      PgDn              moves down one screen's worth
  228.      #line or Gline    moves to the given line in the document (goto line)
  229.      +line             moves forward a number of lines
  230.      -line             moves backward a number of lines
  231.  
  232. Cursor movement keys (right/left):
  233.  
  234.      Right             moves one column to the right
  235.      Left              moves one column to the left
  236.      Tab               moves 8 columns to the right
  237.      Shift-Tab         moves 8 columns to the left
  238.      Ctrl-Right        moves to the far right of the document
  239.      Ctrl-Left         moves to the far left of the document
  240.  
  241. Search for text:
  242.  
  243.      \ or F or f       search for text within the document
  244.                        (the search is case-insensitive; "/COMMERCE" will find
  245.                        "Commerce", "commerce", and "COMMERCE")
  246.      /                 search for exact (case-sensitive) text within the
  247.                        document
  248.      F3                search for the next occurrence of that text
  249.      F9                search for the previous occurrence of that text
  250.  
  251. Marking lines:
  252.  
  253.      Alt-M             mark top line for copy or print
  254.      Alt-B             mark bottom line for copy or print
  255.      Alt-U             unmark all lines
  256.  
  257.  
  258. READ.DOC                               7                           Jul 31, 1997
  259.  
  260. Copying/printing lines (can copy/print either marked lines, all lines, or  just
  261. the lines that are currently on the screen):
  262.  
  263.      Alt-C or Alt-D    copy (duplicate) lines to a file
  264.      Alt-P             print lines
  265.  
  266. Next/previous documents:
  267.  
  268.      Ctrl-PgUp         go to the previous file viewed
  269.      Ctrl-PgDn         go to the next file specified on the input line
  270.  
  271. Miscellaneous:
  272.  
  273.      Alt-E             toggles between 25-line and 43-/50-line mode (if your
  274.                        system supports EGA and VGA respectively)
  275.      Alt-J or Alt-G    jumps (goes) to DOS; say EXIT to get back to program;
  276.                        this feature can be turned off using the /-DOS switch
  277.      Alt-R             shows ruler at the top of the listing
  278.      Ctrl-P or Ctrl-F  do a form feed to the printer
  279.      F1                show key help screen
  280.      Esc               leave READ program
  281.  
  282. Note that you can't view beyond the beginning or end of the document.  This  is
  283. obvious but you cannot scroll to the right if you're  already  seeing  the  far
  284. right of the display.
  285.  
  286.  
  287.  
  288. READ.DOC                               8                           Jul 31, 1997
  289.  
  290. Marking and copying text:
  291.  
  292. If you need to copy a portion of your file to the printer or  to  another  text
  293. file, you will typically want to mark sections of the text first.  This is done
  294. using the mark functions:  Alt-M marks the top line on  the  screen  and  Alt-B
  295. marks the bottom line on the screen.
  296.  
  297. For example, you might decide that you have a 2,000-line document and you  want
  298. to print 50 lines of it.  Go to the first line you want to print or  copy  (you
  299. can use the search options if you want to).  Get that line at either the top of
  300. the screen or the bottom of the screen.  If it's the bottom line, press  Alt-B;
  301. if it's the top line, press Alt-M.
  302.  
  303. Now go to the last line you want to print or copy.  Again,  get  that  line  at
  304. either the top of the screen or the bottom of the screen  and  press  Alt-B  or
  305. Alt-M appropriately.  Having marked two lines, the program tags those lines and
  306. all those lines between them.  You can use the F1 (help) key; it will tell  you
  307. the first and last lines that are marked.
  308.  
  309. Now press Alt-C (or Alt-D) to Copy the lines elsewhere or Alt-P to print  them.
  310. When you select these functions, you'll be asked if you  want  to  process  the
  311. whole file, just those lines on the current  screen,  or  the  lines  that  are
  312. marked.  Ask for the marked lines.  If you selected Alt-C, you'll be asked  for
  313. the file name to copy the lines to.  If the  file  already  exists,  you'll  be
  314. allowed to overwrite the existing file or append to it.
  315.  
  316. Note that you can say "LPT1:" or "PRN:" when you're doing Alt-C in  which  case
  317. the text will go to the printer.  The differences between Alt-C and Alt-P are:
  318.  
  319. (1) Alt-P will remove linefeeds during printing whereas Alt-C leaves them in.
  320.     Typically, Alt-C will result in double-spaced printing.
  321.  
  322. (2) Alt-P may reset the printer based on the width of the current document if a
  323.     READ.INI file is used.
  324.  
  325.  
  326.  
  327. READ.DOC                               9                           Jul 31, 1997
  328.  
  329. Return codes:
  330.  
  331. READ returns the following ERRORLEVEL codes:
  332.  
  333.         0 = no problems
  334.       254 = input file(s) not found
  335.       255 = syntax problems, or /? requested
  336.  
  337.  
  338. Author:
  339.  
  340.                         Bruce Guthrie
  341.                         Room H-4885
  342.                         U.S. Dept of Commerce/ESA/STAT-USA
  343.                         Washington, DC 20230
  344.  
  345.                         voice: (202) 482-3234
  346.                         e-mail: bguthrie@doc.gov
  347.  
  348. You  may  freely  copy  and  re-distribute  this  program;  however,  the  U.S.
  349. Department of Commerce neither guarantees  nor  assures  compatibility  of  the
  350. program with all computer software or hardware.
  351.  
  352. Additional information about this and other Bruce Guthrie programs can be found
  353. in the file BRUCE.DOC which should be included in the original ZIP  file.   The
  354. recent change history for this and  the  other  programs  is  provided  in  the
  355. HISTORY.ymm file which should be in the same ZIP file where "y" is replaced  by
  356. the last digit of the year and "mm" is the two  digit  month  of  the  release;
  357. HISTORY.611 came out in November 1996.  This same naming convention is used  in
  358. naming the ZIP file (READymm.ZIP) that this program was included in.
  359.  
  360. Please provide an Internet e-mail address on all correspondence.
  361.  
  362. 
  363.